home *** CD-ROM | disk | FTP | other *** search
- Path: chronicle.mti.sgi.com!news
- From: austern@isolde.mti.sgi.com (Matt Austern)
- Newsgroups: comp.lang.c++
- Subject: Re: Difficulty hiring people with C++ experience.
- Date: 11 Jan 1996 00:21:42 GMT
- Organization: SGI
- Message-ID: <AUSTERN.96Jan10162142@isolde.mti.sgi.com>
- References: <gmandelDJAoyx.Kpr@netcom.com> <4ai727$of3@nrchh52.rich.nt.com>
- <4api46$c95@no-names.nerdc.ufl.edu> <4bto2d$gnq@usenet1.interramp.com>
- <gmandelDKL1AF.K22@netcom.com> <4clu0d$623@usenet4.interramp.com>
- <4d12p3$26lq@news.doit.wisc.edu> <4d19vg$kam@carbon.cudenver.edu>
- Reply-To: austern@mti.sgi.com
- NNTP-Posting-Host: isolde.mti.sgi.com
- In-reply-to: tgibson@evans.cudenver.edu's message of 10 Jan 1996 21:10:08 GMT
-
- In article <4d19vg$kam@carbon.cudenver.edu> tgibson@evans.cudenver.edu (Todd Arthur Gibson) writes:
-
- > I believe the original poster was talking about statically typed
- > languages vs. dynamically typed languages. C++ is statically
- > typed--the type of variables is known at compile-time. You will
- > get a compiler error if you try to assign a float to a char*.
-
- This is imprecise. C++ objects have both static type (the type of the
- variable or expression that refers to them) and dynamic type. The
- dynamic type of an object need not be the same as its static type,
- since a pointer or reference to a base class may be used to refer to
- an object of a derived class. An object's dynamic type is
- automatically used in virtual function calls; you can also manipulate
- it explicitly using dynamic_cast and typeid. The same is true in
- Eiffel, and Java, and many other languages; the terminology and
- details vary, but the basic distinction remains the same.
-
- What's different about Smalltalk isn't that it has dynamic types but
- rather that it has only dynamic types, as opposed to both static and
- dynamic types.
- --
- Matt Austern
- SGI: MTI Compilers Group
- austern@isolde.mti.sgi.com
-